package com.lhsy.djcloud.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author wangzw
 * @since 2020-09-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("dj_department")
public class Department implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer tenantId;

    private String deptName;
    @TableField(exist = false)
    private String fDeptName;

    private String deptCode;

    private String clerkName;

    /**
     * 等级1=一级 2=二级 3=三级
     */
    private Integer level;

    /**
     * 父级id
     */
    private Integer fid;

    private Date createTime;

    private String createName;

    private Date updateTime;

    private String updateName;

    /**
     *  机构领导人
     */
    private Integer employeeId;
    @TableField(exist = false)
    private List<Department> children = new ArrayList<>();

    @TableField(exist = false)
    private Integer userId;
    @TableField(exist = false)
    private String userName;


}
